import { getWorkbenListAPI } from '@/apis/workben'
export default {
  namespaced: true,
  state() {
    return {
      echartsData: {}
    }
  },
  mutations: {
    setEchartsData(state, data) {
      state.echartsData = data
    }
  },
  actions: {
    async getEchartsData({ commit }) {
      try {
        const res = await getWorkbenListAPI()
        commit('setEchartsData', res.data)
      } catch (error) {
        console.log(error)
      }
    }
  },
  getters: {
    echartsData: state => state.echartsData
  }
}
